﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace Fares
{
    public partial class VarianteArticoleFrm : FrmRezumat
    {
        public Int32 IDArticol = 0;
        public VarianteArticoleFrm(ModuleClass mc,Int32 _idArt):base(mc)
        {
            IDArticol = _idArt;
            InitializeComponent();
            workConnString = mc.workConnectionString;
            eSRPDataSet.ArticoleVariante.IDArticolColumn.DefaultValue = _idArt;
            eSRPDataSet.ArticoleVariante.PretVanzareColumn.DefaultValue = 0;
        }

        private void VarianteArticoleFrm_Load(object sender, EventArgs e)
        {
            AddBindingSource(articoleVarianteBindingSource);
            listTableAdaptor.Add(articoleVarianteTableAdapter.Adapter);


            SqlConnection con = DeschideConexiune(workConnString);
            this.articoleVarianteTableAdapter.Connection = con;
            this.articoleVarianteTableAdapter.FillByIDArticol(this.eSRPDataSet.ArticoleVariante, IDArticol);
            InchideConexiune(con);

        }
    }
}
